package com.wcity.manage.web.lottery;

import com.show.api.ShowApiRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 彩票接口
 * Created by Zm on 2017/4/12.
 */
@Controller
public class LotteryAct {

    @RequestMapping(value = "lottery_lists",produces = "text/html; charset=UTF-8")
    @ResponseBody
    public Object lotteryLists(){
        String my_appId = "12810";
        String my_appSecret = "2318509fd44348d59ca08b97a9fb2a25";
        String res=new ShowApiRequest("http://route.showapi.com/44-6",my_appId,my_appSecret)
                .post();
        System.out.println(res);
        return res;
    }

    @RequestMapping(value = "lottery_expect", produces = "text/html; charset=UTF-8")
    @ResponseBody

    public Object lotteryExpect(String code,String expect){
        String my_appId = "12810";
        String my_appSecret = "2318509fd44348d59ca08b97a9fb2a25";
        String res=new ShowApiRequest("http://route.showapi.com/44-3",my_appId,my_appSecret)
                .addTextPara("code",code)
                .addTextPara("expect",expect)
                .post();
        return res;
    }

    public static void main(String[] args) {
        LotteryAct lotteryAct = new LotteryAct();
        lotteryAct.lotteryLists();
        lotteryAct.lotteryExpect("gd11x5","");
    }

}
